{{- $base := absURL "" }}
{{- $items := .Site.Data.social }}
{{- $social := .Site.Menus.social }}
{{- with $social }}
  {{- $items = . }}
{{- end }}
<div class='follow'>
  {{- range $items }}
  {{- $url := .URL }}
  {{- $label := lower .Name }}
  {{- if eq $social nil }}
    {{ $url = .url }}
    {{ $label = lower .item }}
  {{- end }}
  {{- if and (eq (hasPrefix $url $base) false) (eq (hasPrefix $url "http") false) }}
    {{ $url = absLangURL $url }}
  {{- end }}
  <a href="{{ $url }}">
    {{ partial "common/sprite" (dict "icon" $label) }}
  </a>
  {{- end }}
  <!-- toggle dark mode -->
  <div class="color_mode">
    <input type="checkbox" class="color_choice" id="mode">
  </div>
</div>
